{template 'public/header'}
{template 'public/comhead'}
<link rel="stylesheet" type="text/css" href="../addons/zh_tcwq/template/public/ygcss.css">
<style type="text/css">
    .dizhi{margin-top: 10px;color: #44ABF7;}

</style>
<ul class="nav nav-tabs">    
    <span class="ygxian"></span>
    <div class="ygdangq">当前位置:</div>
   <li class="active"><a href="javascript:void(0);">基本信息</a></li>
</ul>
<div class="main">
    <form action="" method="post" class="form-horizontal form" enctype="multipart/form-data">
        <!--<input type="hidden" name="parentid" value="{$parent['id']}" />-->
        <div class="panel panel-default ygdefault">
            <div class="panel-heading wyheader">
                基本信息
            </div>
            <div class="panel-body">
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">平台名称</label>
                    <div class="col-sm-9">
                       <input type="text" name="pt_name" class="form-control" value="{$item['pt_name']}" />
                    </div>
                </div>

                <div class="form-group Operate">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">平台logo图片</label>
                    <div class="col-sm-9">
                        {php echo tpl_form_field_image('link_logo', $item['link_logo'])}
                        <span class="help-block">*建议尺寸300*300</span>
                    </div>
                </div>
				
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">平台电话</label>
                    <div class="col-sm-9">
                        <input type="text" name="tel"  class="form-control" value="{$item['tel']}" />
                    </div>
                </div>       
               <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">平台风格颜色</label>
                    <div class="col-sm-9">
                       {php echo tpl_form_field_color('color', $item['color'])} 
                        <span class="help-block">*不填写会默认选中红色</span>
                    </div>
                </div> 
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">首页转发自定义标题</label>
                    <div class="col-sm-9">
                        <input type="text" name="zf_title"  class="form-control" value="{$item['zf_title']}" />
                    </div>
                </div>  

               <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">平台模式</label>
                    <div class="col-sm-9">

                        <span class="radio-inline">
                            <input id="moredan1" type="radio" name="model" value="1" {if $item['model']==1}checked{/if} /> 
                             <!-- <input id="moredan1" type="radio" name="model" value="1"/>  -->
                            <label for="moredan1">运营版</label>
                        </span>
                        <span class="radio-inline">
                            <input id="moredan2" type="radio" name="model" value="2" {if $item['model']==2}checked{/if} /> 
                            <!-- <input id="moredan2" type="radio" name="model" value="2"/>  -->
                            <label for="moredan2">过审版</label>
                        </span>
                    </div>
                </div>
                   <div class="form-group Operate">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">开屏广告</label>
                    <div class="col-sm-9">
                       {php echo tpl_form_field_multi_image('kp_img',$kp_img);}
                       <span class="help-block">* 建议尺寸大小:563*878px</span>
                    </div>
                </div>   
                <div class="form-group Operate">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">开屏广告倒计时(秒)</label>
                    <div class="col-sm-9">
                       <input type="number" name="kp_time"  class="form-control" value="{$item['kp_time']}" />
                       <span class="help-block">*空或不填则为默认值</span>
                    </div>
                </div>
                 <div class="form-group trial">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">过审页幻灯片</label>
                    <div class="col-sm-9">
                       {php echo tpl_form_field_multi_image('gs_img',$gs_img);}
                       <span class="ygmargin">* 建议尺寸大小:750*360px</span>
                    </div>
                </div>
                <div class="form-group trial">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">过审页电话</label>
                    <div class="col-sm-9">
                       <input type="text" name="gs_tel" class="form-control" value="{$item['gs_tel']}" />
                    </div>
                </div>
                <div class="form-group trial">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">过审页营业时间</label>
                    <div class="col-sm-9">
                       <input type="text" name="gs_time" class="form-control" value="{$item['gs_time']}" />
                    </div>
                </div>
                <div class="form-group trial">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">过审页地址</label>
                    <div class="col-sm-9">
                       <input type="text" name="gs_add" class="form-control" value="{$item['gs_add']}" />
                    </div>
                </div>
                <div class="form-group trial">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">过审页地址坐标</label>
                    <div class="col-sm-10">
                     <!-- {php echo tpl_form_field_coordinate('op',$list['coordinates'])} -->
                     <input type="text" name="gs_zb" class="form-control dizhiname" value="{$item['gs_zb']}" placeholder="例如:30.527540,114.346430" />
                     <a href="http://lbs.qq.com/tool/getpoint/" target="_blank">
                     <p class="dizhi">*点击获取地理位置</p></a>
                    </div>
                </div>
                <div class="form-group trial">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">过审页详情</label>
                    <div class="col-sm-9">
                         {php echo tpl_ueditor('gs_details',$item['gs_details']);}
                    </div>
                </div>  

                <div class="form-group Operate">
                   <label for="lastname" class="col-sm-2 control-label">天气和总访问量是否显示</label>
                   <div class="col-sm-10">
                        <label class="radio-inline">
                           <input type="radio" name="zfwl_open" value="1" {if $item['zfwl_open']==1 }checked{/if} />是
                       </label>
                       <label class="radio-inline">
                           <input type="radio" name="zfwl_open" value="2" {if $item['zfwl_open']==2|| empty($item['zfwl_open'])}checked{/if} />否
                       </label>
                   </div>
               </div> 
               <div class="form-group Operate">
                   <label for="lastname" class="col-sm-2 control-label">客服按钮</label>
                   <div class="col-sm-10">
                        <label class="radio-inline">
                           <input type="radio" name="is_kf" value="1" {if $item['is_kf']==1 }checked{/if} />显示
                       </label>
                       <label class="radio-inline">
                           <input type="radio" name="is_kf" value="2" {if $item['is_kf']==2|| empty($item['is_kf'])}checked{/if} />隐藏
                       </label>
                   </div>
               </div>
              
                <div class="form-group Operate">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">平台访问量</label>
                    <div class="col-sm-9">
                       <input type="number" name="total_num"  class="form-control" value="{$item['total_num']}" />
                       <span class="help-block">*空或不填则为真实访问数据</span>
                    </div>
                </div>
                  <div class="form-group Operate">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">帖子资讯最大随机数设置</label>
                    <div class="col-sm-9">
                       <input type="number" name="sj_max"  class="form-control" value="{$item['sj_max']}" />
                       <span class="help-block">*最大只能输入9(用于生成帖子和资讯的阅读量,不输入值此功能无效)</span>
                    </div>
                </div>
                 <div class="form-group Operate">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">商家浏览量最大随机数设置</label>
                    <div class="col-sm-9">
                       <input type="number" name="sj_max2"  class="form-control" value="{$item['sj_max2']}" />
                       <span class="help-block">*最大只能输入9(用于生成商家的浏览量,不输入值此功能无效)</span>
                    </div>
                </div>
                  <div class="form-group Operate">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">总访问量最大随机数设置</label>
                    <div class="col-sm-9">
                       <input type="number" name="zfwl_max"  class="form-control" value="{$item['zfwl_max']}" />
                       <span class="help-block">*最大只能输入9(用于生成总访问量,不输入值此功能无效)</span>
                    </div>
                </div>  
                <div class="form-group Operate">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">首页弹框图片</label>
                    <div class="col-sm-9">
                        {php echo tpl_form_field_image('tc_img', $item['tc_img'])}
                        <span class="help-block">*建议尺寸380*300</span>
                    </div>
                </div>
                <div class="form-group Operate">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">首页弹框公告</label>
                    <div class="col-sm-9">
                       <input type="text" name="tc_gg"  class="form-control" value="{$item['tc_gg']}" />
                    </div>
                </div>
                

                                <!--  <div class="form-group">
                  <label for="lastname" class="col-sm-2 control-label">是否开启拼车</label>
                  <div class="col-sm-10">
                       <label class="radio-inline">
                          <input type="radio" name="is_pcfw" value="1" {if $item['is_pcfw']==1 || empty($item['is_pcfw'])}checked{/if} />开启
                      </label>
                      <label class="radio-inline">
                          <input type="radio" name="is_pcfw" value="2" {if $item['is_pcfw']==2}checked{/if} />关闭
                      </label>
                  </div>
                                </div>
                                <div class="form-group">
                  <label for="lastname" class="col-sm-2 control-label">是否开启加盟</label>
                  <div class="col-sm-10">
                       <label class="radio-inline">
                          <input type="radio" name="is_hhr" value="1" {if $item['is_hhr']==1 || empty($item['is_hhr'])}checked{/if} />开启
                      </label>
                      <label class="radio-inline">
                          <input type="radio" name="is_hhr" value="2" {if $item['is_hhr']==2}checked{/if} />关闭
                      </label>
                  </div>
                                </div>
                                <div class="form-group">
                  <label for="lastname" class="col-sm-2 control-label">是否开启红包福利</label>
                  <div class="col-sm-10">
                       <label class="radio-inline">
                          <input type="radio" name="is_hbfl" value="1" {if $item['is_hbfl']==1 || empty($item['is_hbfl'])}checked{/if} />开启
                      </label>
                      <label class="radio-inline">
                          <input type="radio" name="is_hbfl" value="2" {if $item['is_hbfl']==2}checked{/if} />关闭
                      </label>
                  </div>
                                </div>
                                 <div class="form-group">
                  <label for="lastname" class="col-sm-2 control-label">是否开启帖子</label>
                  <div class="col-sm-10">
                       <label class="radio-inline">
                          <input type="radio" name="is_tzopen" value="1" {if $item['is_tzopen']==1 || empty($item['is_tzopen'])}checked{/if} />开启
                      </label>
                      <label class="radio-inline">
                          <input type="radio" name="is_tzopen" value="2" {if $item['is_tzopen']==2}checked{/if} />关闭
                      </label>
                  </div>
                                </div>
                                 <div class="form-group">
                  <label for="lastname" class="col-sm-2 control-label">是否开启黄页114</label>
                  <div class="col-sm-10">
                       <label class="radio-inline">
                          <input type="radio" name="is_pageopen" value="1" {if $item['is_pageopen']==1 || empty($item['is_pageopen'])}checked{/if} />开启
                      </label>
                      <label class="radio-inline">
                          <input type="radio" name="is_pageopen" value="2" {if $item['is_pageopen']==2}checked{/if} />关闭
                      </label>
                  </div>
                                </div> -->
                
                <div class="form-group Operate">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">平台简介</label>
                    <div class="col-sm-9">
                         {php echo tpl_ueditor('details',$item['details']);}
                    </div>
                </div>
               
            </div> 

        </div>
        <div class="form-group Operate">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label">发布一条商品价格</label>
            <div class="col-sm-9">
              <input type="text" onkeyup="value=value.replace(/[^\-?\d.]/g,'')" name="goods_pay_money" class="form-control" value="{$item['goods_pay_money']}" />
              *商户发布一条商品多少钱,不填或填零则不开启收费
            </div>
          </div>
        <div class="form-group Operate">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label">发布一条秒杀商品价格</label>
            <div class="col-sm-9">
              <input type="text" onkeyup="value=value.replace(/[^\-?\d.]/g,'')" name="miaosha_pay_money" class="form-control" value="{$item['miaosha_pay_money']}" />
              *商户发布一条秒杀商品多少钱,不填或填零则不开启收费
            </div>
          </div>
        <!-- 红包币兑换消费劵 -->
        <div class="form-group Operate">
                  <label for="lastname" class="col-sm-2 control-label">是否开启红包币兑换消费劵</label>
                  <div class="col-sm-10">
                       <label class="radio-inline">
                          <input type="radio" name="exchange_is_stat" id="exchange_is_stat" onclick="myFunction1()" value="-1" {if $item['exchange_is_stat']==-1 || empty($item['exchange_is_stat'])}checked{/if} />关闭
                      </label>
                      <label class="radio-inline">
                          <input type="radio" name="exchange_is_stat" id="exchange_is_stat" onclick="myFunction2()" value="1" {if $item['exchange_is_stat']==1}checked{/if} />开启
                      </label>
                  </div>
        </div>
        <div id="exchange_block" style="display:{if $item['exchange_is_stat']==-1}none{/if}">
            <div class="form-group">
              <label class="col-sm-2 control-label">
                  <span style='color:red'>*</span>兑换开始时间
              </label>
              <div class="col-sm-3">
                  {php echo _tpl_form_field_date('exchange_stat_time',$item['exchange_stat_time'],1)}
              </div>
           </div>
            <div class="form-group">
              <label class="col-sm-2 control-label">
                  <span style='color:red'>*</span>兑换结束时间
              </label>
              <div class="col-sm-3">
                  {php echo _tpl_form_field_date('exchange_end_time',$item['exchange_end_time'],1)}
              </div>
           </div>
            <div class="form-group Operate">
                      <label class="col-xs-12 col-sm-3 col-md-2 control-label">本次可兑换消费劵</label>
                      <div class="col-sm-9">
                         <input type="number" min="0.0" step="0.01" name="exchange_money"  class="form-control" value="{$item['exchange_money']}" />
                      </div>
            </div>
            <div class="form-group Operate">
                      <label class="col-xs-12 col-sm-3 col-md-2 control-label">本次兑换消费劵所需总红包币</label>
                      <div class="col-sm-9">
                         <input type="number" min="0.0" step="0.01" name="exchange_jifen"  class="form-control" value="{$item['exchange_jifen']}" />
                      </div>
            </div>
            <div class="form-group Operate">
                      <label class="col-xs-12 col-sm-3 col-md-2 control-label">兑换比例</label>
                      <div class="col-sm-9">
                         <input type="text" disabled="disabled"  class="form-control" value="{$item['exchange_bili']}" />
                         <span class="help-block">*兑换消费劵所需总红包币/可兑换消费劵=比例(不可编辑，后台计算显示)</span>
                      </div>
            </div>
            <div class="form-group Operate">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">剩余可兑换消费券</label>
                <div class="col-sm-9">
                   <input type="text" disabled="disabled"  class="form-control" value="{$item['exchange_surplus']}" />
                   <span class="help-block">*用户兑换剩余消费券(不可编辑，后台计算剩余显示)</span>
                </div>
            </div>
        </div>
            <!-- 消费劵兑换红包币 -->
        <div class="form-group Operate">
                  <label for="lastname" class="col-sm-2 control-label">是否开启消费劵兑换红包币</label>
                  <div class="col-sm-10">
                       <label class="radio-inline">
                          <input type="radio" name="hbb_exchange_is_stat" id="hbb_exchange_is_stat" onclick="myFunction3()" value="-1" {if $item['hbb_exchange_is_stat']==-1 || empty($item['hbb_exchange_is_stat'])}checked{/if} />关闭
                      </label>
                      <label class="radio-inline">
                          <input type="radio" name="hbb_exchange_is_stat" id="hbb_exchange_is_stat" onclick="myFunction4()" value="1" {if $item['hbb_exchange_is_stat']==1}checked{/if} />开启
                      </label>
                  </div>
        </div>
        <div id="exchange_block2" style="display:{if $item['hbb_exchange_is_stat']==-1}none{/if}">
            <div class="form-group">
              <label class="col-sm-2 control-label">
                  <span style='color:red'>*</span>兑换开始时间
              </label>
              <div class="col-sm-3">
                  {php echo _tpl_form_field_date('hhb_exchange_stat',$item['hhb_exchange_stat'],1)}
              </div>
           </div>
            <div class="form-group">
              <label class="col-sm-2 control-label">
                  <span style='color:red'>*</span>兑换结束时间
              </label>
              <div class="col-sm-3">
                  {php echo _tpl_form_field_date('hhb_exchange_end_time',$item['hhb_exchange_end_time'],1)}
              </div>
           </div>
           <div class="form-group Operate">
            <label class="col-xs-12 col-sm-3 col-md-2 control-label">本次可兑换红包币数量</label>
            <div class="col-sm-9">
               <input type="number" min="0.0" step="0.01" name="hhb_exchange_jifen"  class="form-control" value="{$item['hhb_exchange_jifen']}" />
            </div>
             </div>
            <div class="form-group Operate">
                      <label class="col-xs-12 col-sm-3 col-md-2 control-label">本次兑换红包币所需总消费劵</label>
                      <div class="col-sm-9">
                         <input type="number" min="0.0" step="0.01" name="hhb_exchange_money"  class="form-control" value="{$item['hhb_exchange_money']}" />
                      </div>
            </div>
            
            <div class="form-group Operate">
                      <label class="col-xs-12 col-sm-3 col-md-2 control-label">兑换比例</label>
                      <div class="col-sm-9">
                         <input type="text" disabled="disabled"  class="form-control" value="{$item['hhb_exchange_bili']}" />
                         <span class="help-block">*本次兑换所需总消费劵/本次可兑换红包币=比例(不可编辑，后台计算显示)</span>
                      </div>
            </div>
            <div class="form-group Operate">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">剩余可兑换红包币</label>
                <div class="col-sm-9">
                   <input type="text" disabled="disabled"  class="form-control" value="{$item['hhb_exchange_surplus']}" />
                   <span class="help-block">*用户兑换剩余红包币(不可编辑，后台计算剩余显示)</span>
                </div>
            </div>
        </div>

        <div class="form-group">
            <input type="submit" name="submit" value="提交" class="btn col-lg-3" style="color: white;background-color: #44ABF7;"/>
            <input type="hidden" name="token" value="{$_W['token']}" />
            <input type="hidden" name="id" value="{$item['id']}" />
        </div>
    </form>
</div>
<script type="text/javascript">
    $(function(){
        $("#frame-12").show();
        $("#yframe-12").addClass("wyactive");
        trial($('input:radio:checked').val())
       	function trial(val){
        	if(val==1){
        		$(".trial").hide()
        		$(".Operate").show()
        	}else{
        		$(".trial").show()
        		$(".Operate").hide()
        	}
       	}
        $("#moredan1").click(function(){
        	console.log($("#moredan1").val())
        	trial($("#moredan1").val())
        })
         $("#moredan2").click(function(){
        	console.log($("#moredan2").val())
        	trial($("#moredan2").val())
        })
        
    })
</script>
<script>
function myFunction1(){
  $("#exchange_block").css("display", "none");
}
function myFunction2(){
$("#exchange_block").css("display", "block");
}
function myFunction3(){
  $("#exchange_block2").css("display", "none");
}
function myFunction4(){
$("#exchange_block2").css("display", "block");
}
</script>